package com.mall.user.controller;

import com.mall.common.response.CommonResponse;
import com.mall.entity.TbUserBankCard;
import com.mall.user.service.UserBankCardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 绑定银行卡控制器
 *
 * @author SY
 * @date 2021/07/23
 */
@RestController
@RequestMapping("/userBankCard")
public class UserBankCardController {

    @Autowired
    private UserBankCardService userBankCardService;

    /**
     * 绑定银行卡
     * 需要传入银行卡信息
     * @param userBankCard
     * @return
     */
    @PostMapping("/bindingCard")
    public CommonResponse bindingCard(@RequestBody TbUserBankCard userBankCard){
        return userBankCardService.bindingCard(userBankCard);
    }

}
